package com.demonzym.framework.activitymanager;

import android.app.ActivityGroup;
import android.app.LocalActivityManager;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.widget.LinearLayout;

import com.demonzym.activity.MainActivity;
import com.demonzym.videoplayer.R;

public class ActivityWindowHolder extends ActivityGroup{
	
	public static LocalActivityManager mActivityManager;
	
	private LinearLayout mMainView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		mActivityManager = getLocalActivityManager();
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.main);
		
		mMainView = (LinearLayout) findViewById(R.id.main);
		Intent intent = new Intent(this, MainActivity.class);
		Window w = mActivityManager.startActivity(MainActivity.TAG, intent);
		setContentView(w.getDecorView());
	}
}
